package com.dd.demo.day4;

import java.sql.*;

public class select {
    public static void main(String[] args) {
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/future_community","root","cc65152801");
            Statement sql = con.createStatement();
            ResultSet rs = sql.executeQuery("select * from property_label");
            while (rs.next()) {
                System.out.println(rs.getString("label_id"));
            }
            con.close();
        }
        catch(SQLException | ClassNotFoundException e) {
            e.printStackTrace();
            System.out.println("SQL异常！！！！");
        }

    }}

